﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace EasySamba.Controllers
{
    /// <summary>
    /// 结果
    /// </summary>
    public class Result
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }
        /// <summary>
        /// 信息
        /// </summary>
        public string Massage { get; set; }

        public Result(bool success = false, string massage = null)
        {
            this.Success = success;
            this.Massage = massage;
        }
    }

    public class Result<T> : Result
    {
        public T Data { get; set; }

        public Result(bool success = false, T data = default(T), string massage = null)
        {
            this.Success = success;
            this.Data = data;
            this.Massage = massage;
        }
    }
}
